Add option gcsym to delbin.
authorrobertl <robertl>
Tue, 15 Sep 2009 04:05:20 +0000 (04:05 +0000)
committerrobertl <robertl>
Tue, 15 Sep 2009 04:05:20 +0000 (04:05 +0000)
delbin.c
xmldoc/formats/options/delbin-gcsym.xml [new file with mode: 0644]

index c1d2c11366b43d460bca360cf1f9a62f518ee1db..2359de58dfa75fbb1552bfcb6a9f4a959e65b7b8 100644 (file)
--- a/delbin.c
+++ b/delbin.c
@@ -105,6 +105,7 @@ static char *opt_nuke_trk = NULL;
 static char *opt_nuke_rte = NULL;
 /* If true, Order hint to match Cache Register and Topo 7 */
 static char *opt_hint_at_end = NULL;
+static char *opt_gcsym = NULL;
 
 
 static arglist_t delbin_args[] = {
@@ -121,6 +122,7 @@ static arglist_t delbin_args[] = {
        {"nukerte", &opt_nuke_rte, "Delete all waypoints before sending", NULL, ARGTYPE_BOOL,
                ARG_NOMINMAX },
        {"hint_at_end", &opt_hint_at_end, "If true, geocache hint at end of text", NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
+       {"gcsym", &opt_gcsym, "If set to 0, prefer user-provided symbols over Groundspeaks ones for geocaches", NULL, ARGTYPE_BOOL, ARG_NOMINMAX, "1" },
        ARG_TERMINATOR
 };
 
@@ -1135,7 +1137,7 @@ get_gc_notes(const waypoint* wp, int* symbol, char** notes, unsigned* notes_size
        }
 
        gbfprintf(fd, "Cache ID: %s\n", wp->shortname);
-       if (gc_sym) {
+       if (gc_sym && atoi(opt_gcsym)) {
                gbfprintf(fd, "%s\n", waypoint_symbol(gc_sym));
                *symbol = gc_sym;
        } else if (wp->icon_descr) {
diff --git a/xmldoc/formats/options/delbin-gcsym.xml b/xmldoc/formats/options/delbin-gcsym.xml
new file mode 100644 (file)
index 0000000..777535f
--- /dev/null
@@ -0,0 +1,8 @@
+<para>
+This 1/0 option, defaulting to  if not provided, tells GPSBabel to 
+use its own logic when sending data it can deduce is a geocache to 
+the device. If false, any icon data present in the source data will
+ be used instead. If you've taken control of the icon data, you are
+ responsible for providing valid icons; GPSBabel will make no attempt 
+to purify what gets sent.
+</par>